<div class="widget-box">
<div class="widget-title">
    <span class="icon"><i class="icon-wrench"></i></span>
    <h5>Configuración</h5>
</div>
<div class="widget-content">
<?php
if (!empty($data_config)){
    $id_config = $data_config->id_config;
    if(($data_config->show_adv) > 0 ){$checked_show_adv = TRUE;}else{$checked_show_adv = FALSE;}
    if(($data_config->show_adress) > 0 ){$checked_show_adress = TRUE;}else{$checked_show_adress = FALSE;}
    if(($data_config->show_price) > 0 ){$checked_show_price = TRUE;}else{$checked_show_price = FALSE;}
    $max_upload_img = $data_config->img_max;
}

$atrFrm = array('class' => 'form-horizontal', 'id' => 'frm_config');
$atrInpIdConfig = array('name' =>'id','type'=> 'hidden','value' => $id_config);
$atr_chkShowAdv = array('name' => 'show_adv','checked' => $checked_show_adv ,'value' => '1');
$atr_chkShowAdrr = array('name' => 'show_adress','checked' => $checked_show_adress ,'value' => '1');
$atr_chkShowPrice = array('name' => 'show_price','checked' => $checked_show_price ,'value' => '1');
$atrInpMaximg = array('class' => 'input-mini','type' => 'text','name' =>'max_upload_img','value' => $max_upload_img);
$atrBtn = array('class' => 'btn btn-inverse','type' => 'submit');

echo form_open('admin/update_config_adv',$atrFrm);
echo form_fieldset('Configuración del sistema de avisos');
?>
<p class="muted">FrontEnd</p>
    <div class="control-group">
        <label class="control-label"> Mostrar avisos?</label>
        <div class="controls">   
            <div class="switch switch-small" data-on="success" data-off="warning" data-on-label="SI" data-off-label="NO">
               <?php echo form_checkbox($atr_chkShowAdv); ?>
            </div>
        </div>
    </div>
 <p class="muted">Opciones de publicación</p>
    <div class="control-group">
        <label class="control-label">Dirección en los avisos?</label>
        <div class="controls">
            <div class="switch switch-small" data-on="success" data-off="warning" data-on-label="SI" data-off-label="NO">
               <?php echo form_checkbox($atr_chkShowAdrr ); ?>
            </div>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">Mostrar Precio?</label>
        <div class="controls">
            <div class="switch switch-small" data-on="success" data-off="warning" data-on-label="SI" data-off-label="NO">
               <?php echo form_checkbox($atr_chkShowPrice); ?>
            </div>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">Imagenes por aviso</label>
        <div class="controls">
            <?php echo form_input($atrInpMaximg); ?>
        </div>
    </div>
<?php
echo form_input($atrInpIdConfig);
echo form_button($atrBtn,'Guardar Cambios');
echo form_fieldset_close(); 
echo form_close();

//mensaje de exito
if(!empty($mensaje)):
?>
<div class="span5 alert alert-info" id="mensaje">
    <?php echo $mensaje ?>
</div>
<?php endif;?>
</div>
</div>
